﻿namespace _5._10._1.School
{
    using System;

    public class Student
    {
        private string name;
        private int identificationNumber;

        public Student(string name)
        {
            this.Name = name;

            this.identificationNumber = School.NextFreeStudentNumber;
        }

        public string Name
        {
            get
            {
                return this.name;
            }

            private set
            {
                if (value == null)
                {
                    throw new ArgumentNullException();
                }

                this.name = value;
            }
        }

        public int IdentificationNumber
        {
            get
            {
                return this.identificationNumber;
            }
        }
    }
}